package com.wms.entity;

import com.wms.entity.enums.BlogState;
import com.wms.validation.Update;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class Blog extends BaseEntity {

    @NotNull(message = "id不为空", groups = {Update.class})
    private Long id;

    /**
     * 标题
     */
    @NotNull(message = "标题不为空")
    private String title;

    /**
     * 描述
     */
    private String description;

    /**
     * 内容
     */
    private String content;

    /**
     * md格式
     */
    private String markdown;

    /**
     * 网易云音乐id
     */
    private Long musicId;

    /**
     * 状态
     */
    private BlogState state;

    @Valid
    private Admin admin;
}
